google.load("jquery", "1.3.1");
google.setOnLoadCallback(function()
{
	// Just for demonstration purposes, change the contents/active state using jQuery
	$("#blackboardmenu ul li a").click(function(e) {
		e.preventDefault();
		
		$("#blackboardmenu ul li a").each(function() {
			$(this).removeClass("active");	
		});
		
		$(this).addClass("active");
		
		$("h3").html($(this).attr("title"));
		
		var iFrame = document.getElementById('blackboardFrame');
		if($(this).attr("title") == "PDF"){
			iFrame.src = "http://docs.google.com/gview?url=http://three2learn.kjeldgroot.nl/media/Workbook.pdf&embedded=true";
		}
		else if($(this).attr("title") == "Slides"){
			iFrame.src = "http://docs.google.com/gview?url=http://three2learn.kjeldgroot.nl/media/Three2Learn.ppt&embedded=true";
		}
		else {
			iFrame.src = "";
		}
	});
});